@extends('default.layouts.adminPublic')
@section('title', '智能刷新简历')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/indexList.css')}}">
    @endsection
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/smart_list')}}">首页</a> &raquo; 简历管理
    </div>
    <!--导航结束-->
    <!--结果集标题与导航组件 开始-->

    <div class="con">
        <div class="conMain">
            <div class="result_wrap" style="height:170px;">
                <div class="search">
                    <form name="Formso" id="Formso" action="{{url('admin/smart_list')}}" method="post">
                        {{csrf_field()}}
                        <span>关键字：</span>
                        <span><input name="keyword" class="keyword" id="keyword" placeholder="请输入姓名或者手机号码" type="text"></span>
                        <span><input name="submit" class="skeyword" value="搜索" type="submit"></span>
                    </form>
                    <div class="smart">
                        <ul>
                            <li class="title">刷新类型：</li>
                            <li><a href="{{url('admin/smart_list?inside=1')}}">1天内未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?inside=3')}}">3天内未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?inside=7')}}">7天内未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?inside=15')}}">15天内未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?inside=30')}}">30天内未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?inside=90')}}">90天内未刷新</a></li>
                        </ul>
                        <ul>
                            <li class="title">刷新类型：</li>
                            <li><a href="{{url('admin/smart_list?exceed=1')}}">超过1天未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?exceed=3')}}">超过3天未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?exceed=7')}}">超过7天未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?exceed=15')}}">超过15天未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?exceed=30')}}">超过30天未刷新</a></li>
                            <li><a href="{{url('admin/smart_list?exceed=90')}}">超过90天未刷新</a></li>
                        </ul>
                        <div class="message"><p>目前共查找到<strong>{{$resume->total()}}</strong>份简历！且每页显示条数为{{$resume->perPage()}}条。</p></div>
                    </div>

                </div>
            </div>
            <div class="manage">
                @include('flash::message')
            </div>
            <div class="conInfo">
                <form name="thisForm" id="thisForm" action="" method="post">
                    {{csrf_field()}}
                    <div class="conList" id="conList">
                        <dl class="one">
                            <dt><input name="selectall" type="checkbox" value="1" onclick="CheckAll(this)" /></dt>
                            <dd class="smart1">姓名</dd>
                            <dd class="smart2">最高学历</dd>
                            <dd class="smart3">手机号码</dd>
                            <dd class="smart4">检测时间</dd>
                            <dd class="smart5">刷新时间</dd>
                            <dd class="smart6">寻求职位</dd>
                            <dd class="smart7">操作</dd>
                        </dl>
                        @if($resume->count() > 0 )
                            @foreach($resume as $v)
                                <dl id="list{{$v->id}}">
                                    <dt><input name="selected_id[]" type="checkbox" value="{{$v->id}}" /></dt>
                                    <dd class="smart1"><a href="{{url('resume_'.idEncryption($v->id).'.html')}}" target="_blank">{{$v->name}}</a></dd>
                                    <dd class="smart2">{{$v->education}}</dd>
                                    <dd class="smart3">{{$v->mobile}}</dd>
                                    <dd class="smart4">{{$v->created_at}}</dd>
                                    <dd class="smart5">{{$v->updatetime}}</dd>
                                    <dd class="smart6">{{str_limit($v->intentionjobs,28)}}</dd>
                                    <dd class="smart7">
                                        <span><a href="{{url('admin/personal_welcome/'.$v->uid)}}" target="_blank">账户中心</a></span>
                                        <span><a href="{{url('admin/job_mod_two/'.$v->uid)}}">注册信息</a></span>
                                        <span class="del"><a>跳过</a></span>
                                    </dd>
                                </dl>
                            @endforeach
                        @else
                            <div class="nullcon">对不起！没有符合条件的记录！</div>
                        @endif
                        <dl class="last">
                            <dt>
                                <input name="selectall" id="selectall" type="checkbox" value="1" onclick="CheckAll(this)" />
                                <label for="selectall">全选</label>
                            </dt>
                            <dd class="p6"><a onclick="showconfirm('{{url('admin/smart_update')}}','3')">刷新简历</a></dd>
                        </dl>
                    </div>
                </form>
                <div class="page_list" style="width: 100%; float: left; margin-top:15px;">
                    {!! $resume->appends($appends)->links() !!}
                </div>
            </div>

            <div class="stopper" style="margin-top:10px; border-top: 1px solid #e5e5e5"></div>
        </div>
    </div>
    <!--结果集标题与导航组件 结束-->
@endsection

@section('footerjs')
    @parent
    <script>
        $(function(){
            //删除当前
            @if($resume->count() > 0 )
                @foreach($resume as $v)
                    $('#conList').find("#list" + '{{$v->id}}').find('.del a').click(function(){
                layer.confirm('您确定要跳过这个简历记录吗？', {
                    btn: ['确定', '取消'] //按钮
                }, function () {
                    $.post("/admin/jump_resume",{'id':'{{$v->id}}','_token':"{{csrf_token()}}"},function (data) {
                        if(data.status==0){
                            $('#conList').find("#list" + '{{$v->id}}').remove();
                            layer.msg(data.msg, {icon: 6,time:1500});
                        }else{
                            layer.msg(data.msg, {icon: 5,time:1500});
                        }
                    });
                });
            });
            @endforeach
            @endif
        });
    </script>
    <script type="text/javascript" src="{{asset('/default/js/admin/resumeList.js')}}"></script>
@endsection